from django.urls import path
from .views.login_views import Login
from .views.register_views import Register
from .views import user_info_views
from .views import user_cart_info
from .views import user_receive_address_info
from .views import user_order

urlpatterns = [
    path('register/', Register.as_view()),
    path('login/', Login.as_view()),
    path('username/userAccount/', user_info_views.selectUsername_UserAccount),
    path('userinfo/', user_info_views.selectUserInfo),
    path('change/userinfo/', user_info_views.changeUserInfo),
    path('change/password/', user_info_views.changePassword),
    path('add/userCartInfo/', user_cart_info.addUserCartInfo),
    path('get/userCartInfo/', user_cart_info.getUserCartInfo),
    path('get/new/userCartInfo/id/', user_cart_info.getBestNewCartInfoId),
    path('get/userCartInfo/ids/', user_cart_info.getCartGoodsInfoByIdArr),
    path('update/userCartInfo/', user_cart_info.updateUserCartGoodsNumber),
    path('delete/userCartInfo/', user_cart_info.deleteUserCartInfo),
    path('add/userReceiveAddressInfo/', user_receive_address_info.addUserReceiveAddressInfo),
    path('get/userReceiveAddressInfo/', user_receive_address_info.getUserReceiveAddressInfo),
    path('get/userReceiveAddressInfo/id/', user_receive_address_info.getUserReceiveAddressInfoById),
    path('get/userReceiveAddressInfo/default/', user_receive_address_info.getDefaultUserReceiveAddressInfo),
    path('delete/userReceiveAddressInfo/id/', user_receive_address_info.deleteUserReceiveAddressInfoById),
    path('add/order/', user_order.addOrderInfo),
    path('pay/order/', user_order.payOrder),
    path('get/order/number/', user_order.getOrderNumber),
    path('get/order/all/', user_order.getOrderInfo),
    path('delete/order/id/', user_order.deleteOrderById),
    path('pay/order/id/', user_order.payOrderById),
]
